package cn.myjerry.sort.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class CollectionsDemo {
	public static void main(String[] args) {
		List<Integer> arr = new ArrayList<Integer>();
		
		for(int i=0;i<54;i++){
			arr.add(i);
		}
		Collections.shuffle(arr);
		List<Integer> p1 = new ArrayList<Integer>();
		List<Integer> p2 = new ArrayList<Integer>();
		List<Integer> p3 = new ArrayList<Integer>();
		List<Integer> last = new ArrayList<Integer>();
		for(int i=0;i<51;i+=3){
			p1.add(arr.get(i));
			p2.add(arr.get(i+1));
			p3.add(arr.get(i+2));
		}
		last.add(arr.get(51));
		last.add(arr.get(52));
		last.add(arr.get(53));
		System.out.println("第一人："+p1.toString());
		System.out.println("第二人："+p2.toString());
		System.out.println("第三人："+p3.toString());
		System.out.println("底牌："+last.toString());
		
		List<Integer> arr2 = new ArrayList<Integer>();
		arr2.add(1);
		arr2.add(2);
		arr2.add(3);
		arr2.add(4);
		System.out.println("排序前："+arr2.toString());
		System.out.println("===========倒序==============");
		Collections.reverse(arr2);
		System.out.println("排序后："+arr2.toString());
	}
}
